Use virtual 8086 mode for VMX guests with CR0.PE == 0
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 9 Dec 2008 16:28:02 +0000 (16:28 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 9 Dec 2008 16:28:02 +0000 (16:28 +0000)
commit8d4638d15e10d2d52547195dd6b57402b5382cce
tree768819983f8a3eebd83b897bf28835ea0540f84b
parentdbc75f4a5b8300ed2ef4bd2005b986953ddaf9b3
Use virtual 8086 mode for VMX guests with CR0.PE == 0

When a VMX guest tries to enter real mode, put it in virtual 8086 mode
instead, if that's possible.  Handle all errors and corner cases by
falling back to the real-mode emulator.

This is similar to the old VMXASSIST system except it uses Xen's
x86_emulate emulator instead of having a partial emulator in the guest
firmware.  It more than doubles the speed of real-mode operation on
VMX.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
13 files changed:
tools/firmware/hvmloader/hvmloader.c
tools/libxc/xc_domain_restore.c
tools/libxc/xc_domain_save.c
xen/arch/x86/hvm/vmx/entry.S
xen/arch/x86/hvm/vmx/realmode.c
xen/arch/x86/hvm/vmx/vmcs.c
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/x86_32/asm-offsets.c
xen/arch/x86/x86_64/asm-offsets.c
xen/arch/x86/x86_emulate/x86_emulate.h
xen/include/asm-x86/hvm/vmx/vmcs.h
xen/include/asm-x86/perfc_defn.h
xen/include/public/hvm/params.h